package com.dongge.service;

import com.dongge.entity.Role;
import com.dongge.entity.User;

import javax.transaction.Transactional;
import java.util.List;
import java.util.Set;

/**
 * Created by zhudong on 2016/8/15.
 */
@Transactional
public interface RoleService {
    Set<String> getRoleNamesByUserId(long id);
    Set<String> getRoleNamesByUsername(String username);
    List<Role> getRolesByUserId(long id);
    List<Role> getRolesByUsername(String username);
    List<Role> getRoles();
    long save(Role role);
    int update(Role role);
    void addUser(long roleId,long userId);
    Role get(long id);
    Set<User> getUsersByRoleId(long id);
}
